package com.ticket.sass.provider.dto.input.resource;

import com.ticket.sass.provider.validator.InEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author ywb
 * @date 2022-01-07 15:50
 */
@Data
@ApiModel(value = "菜单新增输入DTO", description = "按照要求填写")
public class ResourceUpdInput {
    @NotNull(message = "ID不能为空")
    @ApiModelProperty(value = "ID", required = true)
    private Integer id;

    @ApiModelProperty("名称")
    private String name;
    
    @ApiModelProperty("级别")
    @InEnum(intValues = {1, 2, 3})
    private Integer level;

    @NotNull(message = "请选择父类")
    @ApiModelProperty("父类id【当类型为1时强制为0】")
    private Integer parentId;

    @ApiModelProperty("备注")
    private String remark;
    
    @ApiModelProperty(value = "排序")
    private Integer sort;
    
    @ApiModelProperty("前端自定义数据 根据等级自定义变换")
    private Map<String, Object> data;
    
    @ApiModelProperty(value = "权限标识符")
    private String perms;
}
